import Layout from '@/layout';

// 商户管理模块路由
let MerchantRoutes = [{
  hidden: true,
  path: '/merchant',
  component: Layout,
  redirect: '/list',
  meta: {
    title: '商户管理'
  },
  children: [
    {
      path: 'list',
      name: 'MerchantList',
      component: () => import('@/views/merchant-management/partial/list'),
      meta: {
        title: '商户列表'
      }
    },
    { // 新增商户
      path: 'add',
      name: 'MerchantAdd',
      component: () => import('@/views/merchant-management/partial/add'),
      meta: {
        title: '新增商户',
        activeMenu: '/merchant/list',
        isNotCheckToken: true
      }
    },
    { // 修改商户
      path: 'edit',
      name: 'MerchantEdit',
      component: () => import('@/views/merchant-management/partial/add'),
      meta: {
        title: '修改商户',
        activeMenu: '/merchant/list',
        isNotCheckToken: true
      }
    },
    { // 查看详情
      path: 'detail',
      name: 'MerchantDetail',
      component: () => import('@/views/merchant-management/partial/detail'),
      meta: {
        title: '商户详情',
        activeMenu: '/merchant/list',
        isNotCheckToken: true
      }
    },
    { // 查看审核详情
      path: '/:status/detail',
      name: 'MerchantReviewDetails',
      component: () => import('@/views/merchant-management/partial/detail'),
      meta: {
        title: '审核商户详情',
        activeMenu: '/merchant/list',
        isNotCheckToken: true
      }
    },
    { // 门店列表
      path: 'shop',
      name: 'MerchantShopList',
      component: () => import('@/views/merchant-management/partial/shop'),
      meta: {
        title: '门店列表'
      }
    },
    { // 新建门店
      path: 'addshop',
      name: 'MerchantShopAdd',
      component: () => import('@/views/merchant-management/partial/shopAdd'),
      meta: {
        title: '新建门店',
        activeMenu: '/merchant/shoplist',
        isNotCheckToken: true
      }
    },
    { // 修改门店
      path: 'editshop',
      name: 'MerchantShopEdit',
      component: () => import('@/views/merchant-management/shop/addshop'),
      meta: {
        title: '修改门店',
        activeMenu: '/merchant/shoplist',
        isNotCheckToken: true
      }
    },
    { // 查看门店
      path: 'showshop',
      name: 'MerchantShopShow',
      component: () => import('@/views/merchant-management/partial/shopDetail'),
      meta: {
        title: '查看门店',
        activeMenu: '/merchant/shoplist',
        isNotCheckToken: true
      }
    },
    { // 设备列表
      path: 'device',
      name: 'MerchantDeviceList',
      component: () => import('@/views/merchant-management/partial/device'),
      meta: {
        title: '设备列表'
      }
    },
    { // 商户收益列表
      path: 'income',
      name: 'MerchantIncome',
      component: () => import('@/views/merchant-management/partial/income'),
      meta: {
        title: '商户收益列表'
      }
    }
  ]
}]

export default MerchantRoutes;
